

<volist name="extendsField" id="vo">
    <div class="setting_table" width="100%" border="0" style="display:block;" cellspacing="0" cellpadding="0">
        <volist name="vo['list']" id="svo">



            <div class="form-group">
                <label class="col-sm-2 control-label">{$svo.remark}</label>
                <div class="col-sm-10">


                    <!--单行文本框-->
                    <eq name="svo['type']" value="0">
                        <input class="form-control" name="extendsField[{$svo.name}]" value="{$extendsField_val[$svo['name']]}" type="text" />
                    </eq>
                    <!--下拉框-->
                    <eq name="svo['type']" value="2">
                        <html:select name="extendsField[{$svo['name']}]" class="form-control" options="svo['_select']" selected="extendsField_val[$svo['name']]" />
                    </eq>
                    <!--编辑框-->
                    <eq name="svo['type']" value="3">
                        <html:editor id="{$svo['name']}_" class="form-control" name="extendsField[{$svo['name']}]" type="UEDIT" style="width:100%;">{$extendsField_val[$svo['name']]}</html:editor>
                    </eq>
                    <!--多行文本-->
                    <eq name="svo['type']" value="1">
                        <textarea class="form-control" name="extendsField[{$svo.name}]" cols="60" rows="6">{$extendsField_val[$svo['name']]}</textarea>
                    </eq>
                    <!--上传图片-->
                    <eq name="svo['type']" value="4">
                        <script>
                            function uploaded{$svo.name}(path,name){
                                $("#"+name).attr("src",'__PUBLIC__'+path);
                                $("input[name='extendsField["+name+"]']").val(path);
                            }
                            function del_img{$svo.name}(name){
                                if(confirm('您确定要删除图片吗?')){
                                    var file=$("input[name='extendsField["+name+"]']").val();
                                    $.post("{:U('delImgBypath')}",{'path':file},function(data){
                                        $("input[name='extendsField["+name+"]']").val('');
                                        $("#"+name).attr('src','');
                                    });
                                }else{
                                    return false;
                                }
                            }
                        </script>
                        <input type="hidden" name="extendsField[{$svo.name}]" value="{$extendsField_val[$svo['name']]}" />
                        <iframe frameborder="0" width="400" height="40" scrolling="no" src="{:U('upload',array('name'=>$svo['name']))}"></iframe>
                        <img src="{:getThumbPath($extendsField_val[$svo['name']])}" id="{$svo.name}" height="80" /><a href="javascript:void(0);" onclick="del_img{$svo.name}('{$svo.name}');">删除</a>
                    </eq>
                    <!--图片上传结束-->

                </div></div>
        </volist>
    </div>

</volist></div>


</div><div class="pages"><button type="submit" class="btn btn-success">保存</button></div>
</form>
</div>
<div class="clear"></div>
</div>


</body></html>
